import Vue from'vue';
import VueRouter from 'vue-router';
// 引入路由组件

import Login from"../pages/Login"
import CollegePage from "../pages/CollegePage"
import DepartmentPage from "../pages/DepartmentPage"
import LeaderPage from "../pages/LeaderPage"
Vue.use(VueRouter)
// 定义路由并暴露


    
const routes=[
        {
            path: '/',
            name: 'CollegePage',
            component: CollegePage,
            redirect: '/Login',
            children: [
                { path: '/Colinfo', component: () => import('@/pages/ColInfo') },
                { path: '/Colteacher', component: () => import('@/pages/ColTeacher') },
                { path: '/Colexamine', component: () => import('@/pages/ColExamine') },
            ]
        },
    {
        path: '/',
        name: 'DepartmentPage',
        component: DepartmentPage,
        redirect: '/Login',
        children: [
            { path: '/Depinfo', component: () => import('@/pages/DepInfo') },
            { path: '/Depteacher', component: () => import('@/pages/DepTeacher') },
            { path: '/Depexamine', component: () => import('@/pages/DepExamine') },
        ]
    },
    {
        path: '/',
        name: 'LeaderPage',
        component: LeaderPage,
        redirect: '/Login',
        children: [
            { path: '/Leaderinfo', component: () => import('@/pages/LeaderInfo') },
            { path: '/Leaderteacher', component: () => import('@/pages/LeaderTeacher') },
            { path: '/Leaderthesis', component: () => import('@/pages/LeaderThesis') },
        ]
    },
        {
            path: '/Login',
            name: 'Login',
            component: Login,
        },
]
const router = new VueRouter({
    mode: 'hash',
    routes
})

export default router
